<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link
	href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"
	rel="stylesheet">
<style>
table {
	/* border-collapse:collapse; */
	text-align: center;
}
</style>
</head>
<body>

	<div class="container">
		<div class="row clearfix">
			<div class="col-md-12 column">
				<div class="page-header">
					<h1>
						<small>书籍列表————显示所有书籍</small>
					</h1>
				</div>
			</div>


			<div class="row">
				<div class="col-md-4 column">
					<a href="${pageContext.request.contextPath}/book/toaddbook"
						class="btn btn-primary">添加书籍</a>
					<a href="${pageContext.request.contextPath}/book/allbook"
						class="btn btn-primary">全部书籍</a>
					<a href="${pageContext.request.contextPath}/book/imgfile"
						class="btn btn-primary">书籍图片</a>
				</div>
				
				
				<div class="col-md-6 column">
					<form action="${pageContext.request.contextPath}/book/querybookname" method="post" class="form-inline">
						<input type="text" name="bookname" class="form-control" placeholder="请输入查询的书名">
						<input type="submit" value="查询" class="btn btn-primary"  style="display: inline-block " width="50">
					</form>
				</div>
				
			</div>
			
			<span style="color: red; font-size: 16px">${err}</span>

			<div class="row clearfix">
				<div class="col-md-12 column">
					<table class="table table-hover tablle-striped">
						<thead>
							<tr>
								<th>编号</th>
								<th>书名</th>
								<th>数量</th>
								<th>说明</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${list}" var="b">
								<tr>
									<td>${b.bookid}</td>
									<td>${b.bookname}</td>
									<td>${b.bookcounts}</td>
									<td>${b.detail}</td>
									<td><a
										href="${pageContext.request.contextPath}/book/toupdatebook?id=${b.bookid}">修改</a>
										&nbsp;|&nbsp; <a
										href="${pageContext.request.contextPath}/book/delbook?bookid=${b.bookid}">删除</a>
									</td>
								</tr>
								<!-- /book/toupdatebook?id=${b.bookid} -->
							</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</body>
</html>